<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>邻里社区 - 发布内容</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary: #FF7F50;
            --secondary: #4ECDC4;
            --accent: #FFD166;
            --warm-orange: #FF9A76;
            --warm-yellow: #FFD166;
            --warm-pink: #FF6B8B;
            --warm-blue: #5B8CFF;
            --warm-green: #7CE0D3;
            --dark: #2D3436;
            --light: #F7F9FC;
            --card-bg: rgba(255, 255, 255, 0.95);
            --header-height: 60px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Nunito', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }
        
        body {
            background: linear-gradient(135deg, #FFF5F0 0%, #FFE8D9 100%);
            color: #333;
            min-height: 100vh;
            overflow-x: hidden;
            padding: 0;
            position: relative;
        }
        
        /* 移动端顶部导航栏 */
        .app-header {
            position: sticky;
            top: 0;
            height: var(--header-height);
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            padding: 0 20px;
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
            z-index: 100;
            border-radius: 0 0 20px 20px;
        }
        
        .back-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: var(--dark);
            background: rgba(255, 127, 80, 0.1);
        }
        
        .app-title {
            flex: 1;
            text-align: center;
            font-size: 18px;
            font-weight: 700;
            color: var(--dark);
            padding-right: 40px;
        }
        
        .container {
            width: 100%;
            max-width: 100%;
            padding: 20px 16px;
            margin: 0 auto;
        }
        
        .welcome-section {
            text-align: center;
            margin: 20px 0 30px;
            position: relative;
        }
        
        .welcome-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, var(--warm-orange) 0%, var(--warm-pink) 100%);
            border-radius: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            box-shadow: 0 10px 25px rgba(255, 111, 97, 0.4);
            color: white;
            font-size: 30px;
            transform: rotate(5deg);
        }
        
        h1 {
            font-size: 28px;
            font-weight: 800;
            color: var(--dark);
            margin-bottom: 8px;
            background: linear-gradient(135deg, var(--warm-orange) 0%, var(--warm-pink) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: inline-block;
        }
        
        .subtitle {
            font-size: 16px;
            color: #FF7F50;
            line-height: 1.5;
            font-weight: 600;
        }
        
        .selection-area {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .category-title {
            font-size: 20px;
            font-weight: 800;
            color: var(--dark);
            margin: 25px 0 15px;
            padding-left: 15px;
            position: relative;
            display: flex;
            align-items: center;
        }
        
        .category-title::before {
            content: '';
            width: 8px;
            height: 25px;
            background: linear-gradient(to bottom, var(--warm-orange), var(--warm-pink));
            border-radius: 10px;
            margin-right: 10px;
        }
        
        .transaction-title::before {
            background: linear-gradient(to bottom, var(--warm-blue), var(--warm-green));
        }
        
        .selection-card {
            width: 100%;
            height: auto;
            min-height: 110px;
            background: var(--card-bg);
            border-radius: 25px;
            padding: 25px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            border: 2px solid transparent;
            background-clip: padding-box;
        }
        
        .selection-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border-radius: 25px;
            padding: 2px;
            background: linear-gradient(135deg, var(--warm-orange) 0%, var(--warm-pink) 100%);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .transaction .selection-card::before {
            background: linear-gradient(135deg, var(--warm-blue) 0%, var(--warm-green) 100%);
        }
        
        .selection-card:hover::before,
        .selection-card:active::before {
            opacity: 1;
        }
        
        .selection-card:active {
            transform: scale(0.97);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        
        .card-icon {
            width: 70px;
            height: 70px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 20px;
            font-size: 28px;
            flex-shrink: 0;
            position: relative;
            z-index: 2;
        }
        
        .community .card-icon {
            background: linear-gradient(135deg, rgba(255, 111, 97, 0.15) 0%, rgba(255, 107, 139, 0.15) 100%);
            color: var(--warm-pink);
            box-shadow: 0 5px 15px rgba(255, 111, 97, 0.2);
        }
        
        .transaction .card-icon {
            background: linear-gradient(135deg, rgba(91, 140, 255, 0.15) 0%, rgba(124, 224, 211, 0.15) 100%);
            color: var(--warm-blue);
            box-shadow: 0 5px 15px rgba(91, 140, 255, 0.2);
        }
        
        .card-content {
            flex: 1;
            position: relative;
            z-index: 2;
        }
        
        .card-title {
            font-size: 18px;
            font-weight: 800;
            margin-bottom: 8px;
            color: var(--dark);
        }
        
        .card-desc {
            font-size: 14px;
            color: #FF7F50;
            line-height: 1.4;
            font-weight: 600;
        }
        
        .transaction .card-desc {
            color: var(--warm-blue);
        }
        
        .card-arrow {
            color: #FF9A76;
            font-size: 20px;
            margin-left: 10px;
            flex-shrink: 0;
            position: relative;
            z-index: 2;
        }
        
        .transaction .card-arrow {
            color: var(--warm-blue);
        }
        
        /* 背景装饰元素 */
        .floating-shapes {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }
        
        .shape {
            position: absolute;
            border-radius: 50%;
            opacity: 0.1;
            animation: float 15s infinite ease-in-out;
        }
        
        .shape-1 {
            width: 150px;
            height: 150px;
            background: var(--warm-orange);
            top: 10%;
            left: -30px;
            animation-delay: 0s;
        }
        
        .shape-2 {
            width: 100px;
            height: 100px;
            background: var(--warm-pink);
            bottom: 15%;
            right: -20px;
            animation-delay: 2s;
        }
        
        .shape-3 {
            width: 120px;
            height: 120px;
            background: var(--warm-yellow);
            top: 50%;
            left: 60%;
            animation-delay: 4s;
        }
        
        /* 底部安全区域填充 */
        .safe-area {
            height: constant(safe-area-inset-bottom);
            height: env(safe-area-inset-bottom);
        }
        
        /* 动画效果 */
        @keyframes fadeIn {
            from { 
                opacity: 0; 
                transform: translateY(20px) scale(0.95); 
            }
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1); 
            }
        }
        
        @keyframes float {
            0%, 100% { 
                transform: translateY(0) rotate(0deg); 
            }
            50% { 
                transform: translateY(-20px) rotate(5deg); 
            }
        }
        
        .selection-card {
            animation: fadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }
        
        .selection-card:nth-child(1) { animation-delay: 0.1s; }
        .selection-card:nth-child(2) { animation-delay: 0.2s; }
        .selection-card:nth-child(3) { animation-delay: 0.3s; }
        .selection-card:nth-child(4) { animation-delay: 0.4s; }
        
        /* 深色模式支持 */
        @media (prefers-color-scheme: dark) {
            :root {
                --card-bg: rgba(40, 40, 40, 0.8);
            }
            
            body {
                background: linear-gradient(135deg, #2a1a1a 0%, #1a1a2a 100%);
                color: #f0f0f0;
            }
            
            .app-header {
                background: rgba(30, 30, 30, 0.8);
            }
            
            .card-title {
                color: #f0f0f0;
            }
            
            .subtitle {
                color: #FF9A76;
            }
        }
    </style>
</head>
<body>
    <div class="floating-shapes">
        <div class="shape shape-1"></div>
        <div class="shape shape-2"></div>
        <div class="shape shape-3"></div>
    </div>
    
    <div class="app-header">
        <div class="back-btn" onclick="history.back()">
            <i class="fas fa-arrow-left"></i>
        </div>
        <div class="app-title">发布内容</div>
    </div>
    
    <div class="container">
        <div class="welcome-section">
            <div class="welcome-icon">
                <i class="fas fa-heart"></i>
            </div>
            <h1>分享到邻里社区</h1>
            <p class="subtitle">选择您想要分享的内容类型，与邻居们建立更亲密的联系</p>
        </div>
        
        <div class="category-title">社区发布</div>
        <div class="selection-area">
            <div class="selection-card community" onclick="selectType('discussion')">
                <div class="card-icon">
                    <i class="fas fa-comment-dots"></i>
                </div>
                <div class="card-content">
                    <h3 class="card-title">发起讨论</h3>
                    <p class="card-desc">分享想法、观点或提出问题</p>
                </div>
                <div class="card-arrow">
                    <i class="fas fa-chevron-right"></i>
                </div>
            </div>
            
            <div class="selection-card community" onclick="selectType('help')">
                <div class="card-icon">
                    <i class="fas fa-hands-helping"></i>
                </div>
                <div class="card-content">
                    <h3 class="card-title">寻求帮助</h3>
                    <p class="card-desc">需要邻居的帮助？发布求助信息</p>
                </div>
                <div class="card-arrow">
                    <i class="fas fa-chevron-right"></i>
                </div>
            </div>
        </div>
        
        <div class="category-title transaction-title">交易发布</div>
        <div class="selection-area">
            <div class="selection-card transaction" onclick="selectType('sell')">
                <div class="card-icon">
                    <i class="fas fa-tag"></i>
                </div>
                <div class="card-content">
                    <h3 class="card-title">出售物品</h3>
                    <p class="card-desc">将闲置物品转让给需要的邻居</p>
                </div>
                <div class="card-arrow">
                    <i class="fas fa-chevron-right"></i>
                </div>
            </div>
            
            <div class="selection-card transaction" onclick="selectType('rent')">
                <div class="card-icon">
                    <i class="fas fa-sync-alt"></i>
                </div>
                <div class="card-content">
                    <h3 class="card-title">出租物品</h3>
                    <p class="card-desc">出租您不常用的物品，赚取额外收入</p>
                </div>
                <div class="card-arrow">
                    <i class="fas fa-chevron-right"></i>
                </div>
            </div>
        </div>
        
        <div class="safe-area"></div>
    </div>

    <script>
        function selectType(type) {
            const typeNames = {
                'discussion': '发起讨论',
                'help': '寻求帮助',
                'sell': '出售物品',
                'rent': '出租物品'
            };
            
            // 显示选择反馈
            const toast = document.createElement('div');
            toast.style.cssText = `
                position: fixed;
                bottom: 80px;
                left: 50%;
                transform: translateX(-50%) translateY(100px);
                padding: 16px 30px;
                background: linear-gradient(135deg, var(--warm-orange) 0%, var(--warm-pink) 100%);
                color: white;
                border-radius: 50px;
                box-shadow: 0 10px 25px rgba(255, 111, 97, 0.4);
                z-index: 1000;
                font-weight: 700;
                transition: all 0.3s ease;
                opacity: 0;
                font-size: 16px;
                white-space: nowrap;
            `;
            toast.textContent = `准备${typeNames[type]}...`;
            document.body.appendChild(toast);
            
            // 显示动画
            setTimeout(() => {
                toast.style.opacity = '1';
                toast.style.transform = 'translateX(-50%) translateY(0)';
            }, 10);
            
            // 2秒后跳转（实际应用中这里会是页面跳转）
            setTimeout(() => {
                toast.style.opacity = '0';
                toast.style.transform = 'translateX(-50%) translateY(100px)';
                setTimeout(() => document.body.removeChild(toast), 300);
                
                // 实际代码中应该是：
                // window.location.href = `/publish/${type}`;
                console.log(`跳转到发布页面: ${type}`);
            }, 2000);
        }
        
        // 添加触摸反馈效果
        document.querySelectorAll('.selection-card').forEach(card => {
            card.addEventListener('touchstart', function() {
                this.style.transform = 'scale(0.97)';
            });
            
            card.addEventListener('touchend', function() {
                this.style.transform = '';
            });
            
            card.addEventListener('touchcancel', function() {
                this.style.transform = '';
            });
        });
    </script>
</body>
</html>
